All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.acl.OwnerImpl

java.lang.Object
   |
   +----sun.security.acl.OwnerImpl

public class OwnerImpl
extends Object
implements Owner
Class implementing the Owner interface. The initial owner principal is configured as part of the constructor.


Constructor Index

 o OwnerImpl(Principal)

Method Index

 o addOwner(Principal, Principal)
Adds an owner.
 o deleteOwner(Principal, Principal)
Delete owner.
 o isOwner(Principal)
returns if the given principal belongs to the owner list.

Constructors

 o OwnerImpl
 public OwnerImpl(Principal owner)

Methods

 o addOwner
 public synchronized boolean addOwner(Principal caller,
                                      Principal owner) throws NotOwnerException
Adds an owner. Owners can modify ACL contents and can disassociate ACLs from the objects they protect in the AclConfig interface. The caller principal must be a part of the owners list of the ACL in order to invoke this method. The initial owner is configured at ACL construction time.

Parameters:
caller - the principal who is invoking this method.
owner - The owner that should be added to the owners list.
Returns:
true if success, false if already an owner.
Throws: NotOwnerException
if the caller principal is not on the owners list of the Acl.
 o deleteOwner
 public synchronized boolean deleteOwner(Principal caller,
                                         Principal owner) throws NotOwnerException, LastOwnerException
Delete owner. If this is the last owner in the ACL, an exception is raised. The caller principal must be a part of the owners list of the ACL in order to invoke this method.

Parameters:
caller - the principal who is invoking this method.
owner - The owner to be removed from the owners list.
Returns:
true if the owner is removed, false if the owner is not part of the owners list.
Throws: NotOwnerException
if the caller principal is not on the owners list of the Acl.
Throws: LastOwnerException
if there is only one owner left in the group, then deleteOwner would leave the ACL owner-less. This exception is raised in such a case.
 o isOwner
 public synchronized boolean isOwner(Principal owner)
returns if the given principal belongs to the owner list.

Parameters:
owner - The owner to check if part of the owners list
Returns:
true if the passed principal is in the owner list, false if not.

All Packages  Class Hierarchy  This Package  Previous  Next  Index